﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Eacademy.Library.Validations;

namespace Eacademy.Domain.Models
{
    public class AdminUsersViewModel
    {
        [DisplayName("Login Name")]
        [Required(ErrorMessage = "Please enter the user's login name")]
        public string Username { get; set; }

        [DataType(DataType.Password)]
        [ValidatePasswordLength]
        public string Password { get; set; }

        [Required(ErrorMessage = "Retype your password")]
        [DisplayName("Confirm Password")]
        [DataType(DataType.Password)]
        [MustMatchProperty("Password", ErrorMessage = "The password and confirmation password does not match.")]
        public string ConfirmPassword { get; set; }

        [DisplayName("Student Number")]
        [Required(ErrorMessage = "Please enter the student number")]
        public string StudentNumber { get; set; }

        [DisplayName("Employee Number")]
        [Required(ErrorMessage = "Please enter the employee number")]
        public string EmployeeNumber { get; set; }

        [DisplayName("First Name")]
        [Required(ErrorMessage = "Please enter the user's first name")]
        public string FirstName { get; set; }

        [DisplayName("Middle Name")]
        [Required(ErrorMessage = "Please enter the user's middle name")]
        public string MiddleName { get; set; }

        [DisplayName("Last Name")]
        [Required(ErrorMessage = "Please enter the user's last name")]
        public string LastName { get; set; }

        [Email(ErrorMessage = "Please enter a valid email")]
        [DisplayName("Primary Email")]
        public string PrimaryEmail { get; set; }

        [Email(ErrorMessage = "Please enter a valid email")]
        [DisplayName("Secondary Email (optional)")]
        public string SecondaryEmail { get; set; }

        public int UserTypeId { get; set; }
    }
}